<div class="users view">
<h2><?php echo __('User'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($user['User']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('User Group'); ?></dt>
		<dd>
			<?php echo $this->Html->link($user['UserGroup']['title'], array('controller' => 'user_groups', 'action' => 'view', $user['UserGroup']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Mobile'); ?></dt>
		<dd>
			<?php echo h($user['User']['mobile']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Email'); ?></dt>
		<dd>
			<?php echo h($user['User']['email']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Password'); ?></dt>
		<dd>
			<?php echo h($user['User']['password']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Name'); ?></dt>
		<dd>
			<?php echo h($user['User']['name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Sex'); ?></dt>
		<dd>
			<?php echo h($user['User']['sex']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Credit'); ?></dt>
		<dd>
			<?php echo h($user['User']['credit']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Created'); ?></dt>
		<dd>
			<?php echo h($user['User']['created']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit User'), array('action' => 'edit', $user['User']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete User'), array('action' => 'delete', $user['User']['id']), null, __('Are you sure you want to delete # %s?', $user['User']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Users'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List User Groups'), array('controller' => 'user_groups', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User Group'), array('controller' => 'user_groups', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Ticket Advisories'), array('controller' => 'ticket_advisories', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Ticket Advisory'), array('controller' => 'ticket_advisories', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List User Bindings'), array('controller' => 'user_bindings', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User Binding'), array('controller' => 'user_bindings', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List User Orders'), array('controller' => 'user_orders', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User Order'), array('controller' => 'user_orders', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Ticket Advisories'); ?></h3>
	<?php if (!empty($user['TicketAdvisory'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Ticket Id'); ?></th>
		<th><?php echo __('User Id'); ?></th>
		<th><?php echo __('Operator Id'); ?></th>
		<th><?php echo __('Question'); ?></th>
		<th><?php echo __('Question Ip'); ?></th>
		<th><?php echo __('Question Local'); ?></th>
		<th><?php echo __('Answer'); ?></th>
		<th><?php echo __('Publish'); ?></th>
		<th><?php echo __('Ticket Show'); ?></th>
		<th><?php echo __('Enable'); ?></th>
		<th><?php echo __('Created'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($user['TicketAdvisory'] as $ticketAdvisory): ?>
		<tr>
			<td><?php echo $ticketAdvisory['id']; ?></td>
			<td><?php echo $ticketAdvisory['ticket_id']; ?></td>
			<td><?php echo $ticketAdvisory['user_id']; ?></td>
			<td><?php echo $ticketAdvisory['operator_id']; ?></td>
			<td><?php echo $ticketAdvisory['question']; ?></td>
			<td><?php echo $ticketAdvisory['question_ip']; ?></td>
			<td><?php echo $ticketAdvisory['question_local']; ?></td>
			<td><?php echo $ticketAdvisory['answer']; ?></td>
			<td><?php echo $ticketAdvisory['publish']; ?></td>
			<td><?php echo $ticketAdvisory['ticket_show']; ?></td>
			<td><?php echo $ticketAdvisory['enable']; ?></td>
			<td><?php echo $ticketAdvisory['created']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'ticket_advisories', 'action' => 'view', $ticketAdvisory['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'ticket_advisories', 'action' => 'edit', $ticketAdvisory['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'ticket_advisories', 'action' => 'delete', $ticketAdvisory['id']), null, __('Are you sure you want to delete # %s?', $ticketAdvisory['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Ticket Advisory'), array('controller' => 'ticket_advisories', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related User Bindings'); ?></h3>
	<?php if (!empty($user['UserBinding'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('User Bind Type Id'); ?></th>
		<th><?php echo __('User Id'); ?></th>
		<th><?php echo __('Token Access'); ?></th>
		<th><?php echo __('Token Secret'); ?></th>
		<th><?php echo __('Open Id'); ?></th>
		<th><?php echo __('Head'); ?></th>
		<th><?php echo __('Name'); ?></th>
		<th><?php echo __('Link'); ?></th>
		<th><?php echo __('Created'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($user['UserBinding'] as $userBinding): ?>
		<tr>
			<td><?php echo $userBinding['id']; ?></td>
			<td><?php echo $userBinding['user_bind_type_id']; ?></td>
			<td><?php echo $userBinding['user_id']; ?></td>
			<td><?php echo $userBinding['token_access']; ?></td>
			<td><?php echo $userBinding['token_secret']; ?></td>
			<td><?php echo $userBinding['open_id']; ?></td>
			<td><?php echo $userBinding['head']; ?></td>
			<td><?php echo $userBinding['name']; ?></td>
			<td><?php echo $userBinding['link']; ?></td>
			<td><?php echo $userBinding['created']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'user_bindings', 'action' => 'view', $userBinding['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'user_bindings', 'action' => 'edit', $userBinding['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'user_bindings', 'action' => 'delete', $userBinding['id']), null, __('Are you sure you want to delete # %s?', $userBinding['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New User Binding'), array('controller' => 'user_bindings', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related User Orders'); ?></h3>
	<?php if (!empty($user['UserOrder'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Sys Website Id'); ?></th>
		<th><?php echo __('User Id'); ?></th>
		<th><?php echo __('User Order State Id'); ?></th>
		<th><?php echo __('User Address Id'); ?></th>
		<th><?php echo __('User Order Paytype Id'); ?></th>
		<th><?php echo __('Sys Logistic Tpl Id'); ?></th>
		<th><?php echo __('Ordernum'); ?></th>
		<th><?php echo __('Price Before'); ?></th>
		<th><?php echo __('Price 56'); ?></th>
		<th><?php echo __('Use Credit'); ?></th>
		<th><?php echo __('Orderprice'); ?></th>
		<th><?php echo __('Created'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($user['UserOrder'] as $userOrder): ?>
		<tr>
			<td><?php echo $userOrder['id']; ?></td>
			<td><?php echo $userOrder['sys_website_id']; ?></td>
			<td><?php echo $userOrder['user_id']; ?></td>
			<td><?php echo $userOrder['user_order_state_id']; ?></td>
			<td><?php echo $userOrder['user_address_id']; ?></td>
			<td><?php echo $userOrder['user_order_paytype_id']; ?></td>
			<td><?php echo $userOrder['sys_logistic_tpl_id']; ?></td>
			<td><?php echo $userOrder['ordernum']; ?></td>
			<td><?php echo $userOrder['price_before']; ?></td>
			<td><?php echo $userOrder['price_56']; ?></td>
			<td><?php echo $userOrder['use_credit']; ?></td>
			<td><?php echo $userOrder['orderprice']; ?></td>
			<td><?php echo $userOrder['created']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'user_orders', 'action' => 'view', $userOrder['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'user_orders', 'action' => 'edit', $userOrder['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'user_orders', 'action' => 'delete', $userOrder['id']), null, __('Are you sure you want to delete # %s?', $userOrder['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New User Order'), array('controller' => 'user_orders', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
